import myRequest from '../../index'
import { IDataType } from '../../types'
enum SystemApi {}
//post调用该方法
const getPageListData = (url: string, queryInfo: any) => {
  return myRequest.post<IDataType>({
    url: url,
    data: queryInfo,
    params: queryInfo
  })
}
// /users/id
const deletePageData = (url: string) => {
  return myRequest.delete<IDataType>({
    url: url
  })
}
const createPageData = (url: string, newData: any) => {
  console.log(newData)
  return myRequest.post<IDataType>({
    url: url,
    data: newData
  })
}

const editPageData = (url: string, editData: any) => {
  return myRequest.post<IDataType>({
    url: url,
    data: editData,
    params: editData
  })
}
const record = (editData: any) => {
  return myRequest.post<IDataType>({
    url: '/record',
    data: editData
  })
}
export { getPageListData, deletePageData, createPageData, editPageData, record }
